home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15196 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.unix.programmer,comp.lang.c
  2. Path: newsfeed.acns.nwu.edu!firewall!ceco!root
  3. From: John Hobson <jhobson@ceco.ceco.com>
  4. Subject: Re: Geting program path
  5. X-Nntp-Posting-Host: disaster
  6. Content-Type: text/plain; charset=us-ascii
  7. Message-ID: <Dq0qps.D6s@ceco.ceco.com>
  8. Sender: root@ceco.ceco.com (Operator)
  9. Content-Transfer-Encoding: 7bit
  10. Organization: Commonwealth Edison
  11. References: <3mtt4d$6ml@alfa.ist.utl.pt> <4l0khj$va9@news.alaska.edu>
  12. Mime-Version: 1.0
  13. Date: Wed, 17 Apr 1996 18:15:28 GMT
  14. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3_U1 sun4c)
  15. X-Url: news:4l0khj$va9@news.alaska.edu
  16.  
  17. fxfjn@camelot.acf-lab.alaska.edu (Frankie J. Nichols) wrote:
  18. >try 'which' then the command (executable) you need the path of
  19. >
  20. >   -frankie
  21. >
  22. >
  23. >Highlander C H B M (l39801@ci.ist.utl.pt) wrote:
  24. >
  25. >: I need to find the path of the executable so I can stat() and touch it.
  26. >: Anybody knows how to do it ? ( geting the $PWD or getcwd() doesn't help 
  27. >: cause it can be anywhere along the $PATH )
  28.  
  29. 'which' is the C-shell (boo, hiss) version. In Korn shell (huzza!), try
  30. 'whence'.
  31.  
  32. -- 
  33. John Hobson             | The Mahatma Gandhi was once asked, "Mr 
  34. Unix Support Group         | Gandhi, what do you think of Western 
  35. Commonwealth Edison, Chicago, IL | Civilization?" He replied, "I think
  36. jhobson@ceco.ceco.com         | that it would be an excellent idea."
  37.  
  38.